
import java.util.Scanner;
 
public class Demo08 {
	public static void main(String[] args) {
		Scanner reader=new Scanner(System.in);
		int a=0,n=0,b=0;
		System.out.println("输入a：");
		a=reader.nextInt();
		b=a;
		System.out.println("输入次数n:");
		n=reader.nextInt();
		int sum=0;
		for(int i=0;i<n;i++)
		{
			sum+=a;
			a=a*10;
			a+=b;
		}	
		System.out.println("sum="+sum);
	}
}
